package com.wframe.project.former.dataservices.information;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.frame.database.BaseDao;
import com.frame.database.JBaseService;
import com.frame.database.JServiceFactory;
import com.frame.database.JdataBean;
import com.wframe.framework.database.ParmSqlVo;
import com.wframe.framework.util.ConversionUtil;

public class SmsPushService extends JBaseService<BaseDao>{

	public static SmsPushService getIntance(){
        return JServiceFactory.createJServiceProxy(SmsPushService.class);
    }
	
	public void addSmsPush(String grade,String content) throws Exception{
		String sql="select phone,'"+content+"' from wbuser where state =1 and phone is not null";
		Object[] obj=null;
		if(StringUtils.isNotBlank(grade)){
			sql+=" and grade=?";
			obj=new Object[]{grade};
		}
		sql+=" group by phone";
		getDao().getSession().update("insert into wb_smspush (phone,content) "+sql,obj);
	}
	
}
